<%-- 
    Document   : index
    Created on : 2016-6-28, 12:09:22
    Author     : 52461
--%>

<%@page import="com.cxhd.lis.DataCache"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="css/materialdesignicons.min.css" media="screen">
        <link rel="stylesheet" href="css/bootstrap.min.css" media="screen">
        <link rel="stylesheet" href="css/material-kit-login.css" media="screen">
        <link rel="stylesheet" href="css/font-awesome.css" media="screen">
        <link rel="stylesheet" href="css/login.css" media="screen">
        <link rel="stylesheet" href="css/nprogress.css" media="screen">
          <link rel="icon" href="favicon.ico" type="image/x-icon">
        <script src="js/jquery-1.9.1.js"></script>
        <script src="js/jquery.cxhd.js"></script>
        <script src="js/bootstrap.min.js"></script>
        <script src="js/material-kit.js"></script>
        <script src="js/material.min.js"></script>
        <script src="js/login.js"></script>
        <script src="js/nprogress.js"></script>
        <script type="text/javascript" src="js/angular/angular.min.js"></script>
        <script type="text/javascript" src="js/angular-base.js"></script>
        <title>登录</title>
    </head>
    <body ng-app="loginUser" ng-controller="mainCtrl" style="background-color:#f7fafc;">

        <div class="container" style="margin-top: 160px;">
            <div class="row">
                <div class="col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3">
                    <div class="card card-signup">
                        <form class="form"  onSubmit="return false;">
                            <div class="header header-primary text-center" style=" opacity: 0.8">
                                <h3><%=DataCache.getIntance().getConfig().get("hospitalName")%>LIS系统</h3>

                            </div>
                            <h4 class="text-divider">深圳绰曦互动科技有限公司</h4>
                            <div class="content" style="margin-bottom: 60px;">

                                <div class="input-group">
                                    <span class="input-group-addon">
                                        <i class="mdi mdi-face " style="font-size: 24px;"></i>
                                    </span>
                                    <input autocomplete="off" type="text" id="userId" ng-model="userId" class="form-control" placeholder="用户名">
                                </div>



                                <div class="input-group">
                                    <span class="input-group-addon">
                                        <i style="font-size: 24px;" class="mdi mdi-lock-outline"></i>
                                    </span>
                                    <input id="password" autocomplete="off" ng-model="password" type="password" placeholder="密码" class="form-control" />
                                </div>


                            </div>
                            <div class="footer text-center">
                                <button ng-click="login($event)" class="btn btn-simple btn-primary btn-lg">登录--系统</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>


        <div id="particles"></div>

    </body>
</html>
<script>


    angular.module("loginUser", ['baseModule'])

            .controller("mainCtrl", function ($scope, base) {
                $("#userId").focus();
                $scope.login = function ($event) {

                    if ($event)
                        $event.preventDefault();
                    base.post("login", {userId: $scope.userId, password: $scope.password}).get(function (data) {
                        if (data == 'true') {
                            location = "main";
                        } else {
                            steveAl("用户名或密码错误!", 1000);
                        }
                    })
                };

            })





</script>
